package net.oschina.app.testcase.login;

import net.oschina.app.testcases.favorites.BasicTestCase;

/**
 * Created by Administrator on 2017/6/30.
 */

public class LoginFail extends BasicTestCase {


    public void testName() throws Exception {
        //登录模块用例1

        helper.getPageNavigation().clickMyTab();
        helper.getPageMyTab().clickLoginIcon();
        helper.getPageLogin().login("helloworld","123456");
        assertTrue(helper.getPageCommon().searchText("用户名或口令错"));


        /*//选择 我的
        solo.clickOnView(solo.getView("net.oschina.app:id/nav_item_me"));
        //点击 我的头像登录
        solo.clickOnView(solo.getView("net.oschina.app:id/iv_portrait"));
        // 定位用户名 框
        EditText nameET = (EditText) solo.getView("net.oschina.app:id/et_username");
        solo.clearEditText(nameET);
        //定位 密码框
        EditText pwdET = (EditText) solo.getView("net.oschina.app:id/et_password");
        solo.clearEditText(pwdET);
        //输入用户名
        solo.enterText(nameET,"helloworld");
        //输入密码
        solo.enterText(pwdET,"123465");
        //定位登录按钮
        Button loginBtn = (Button) solo.getView("net.oschina.app:id/btn_login");
        //点击登录 按钮
        solo.clickOnView(loginBtn);
        //校验用户名密码出错*/
//        assertTrue(solo.searchText("用户名或口令错",true));



    }
}
